package hns.services;

import hns.Bot;
import hns.Service;

public class ListServicesService implements Service {
	String command = "!help";

	
	public ListServicesService(){
		Bot.getInstance().addService(getCommandName(), this);
	}
	@Override
	public String getCommandName() {
		return command;
	}

	@Override
	public void onMessage(String channel, String sender, String login,
			String hostname, String message) {
		Bot.getInstance().sendMessage(channel, "The services currently installed are:");
		for(String s : Bot.getInstance().getServicesMap().keySet()){
			if(s != null){
				Bot.getInstance().sendMessage(channel, s);
			}
		}

	}

	@Override
	public void onJoin(String channel, String sender, String login,
			String hostname) {
		// TODO Auto-generated method stub

	}

}
